<script setup>
  import { onHide, onLaunch, onShow } from "@dcloudio/uni-app";
  import { useUserStore } from "./store/user";
  import { useWalletStore } from "./store/wallet";

  const userStore = useUserStore();

  const walletStore = useWalletStore();

  onLaunch(async () => {
    if (userStore.isLogin) {
      await userStore.fetchIsRider();
      await userStore.fetchBindWechatInfo();
      await userStore.fetchBankcardList();
      if (userStore.isRider) {
        await userStore.fetchRiderInfo();
      }
    }
  });

  onShow(() => {
    console.log("onShow");
  });

  onHide(() => {
    console.log("onHide");
  });
</script>

<style lang="scss">
  /*每个页面公共css */
  // @import "uview-plus/index.scss";
  @import "uni_modules/uview-plus/index.scss";
  @import "common/demo.scss";
  @import "assets/style/global.scss";
</style>
